Constants and System Constants

A value assigned to a constant in the Declaration Editor stays the same during the whole execution time. The value of system constants can be changed for each platform configuration.

System constant

Constants can be set to be system constants by selecting the System Constant check box in the Declaration Editor. A system constant can have a different value for each platform configuration. Thus, a platform-specific system constant value only applies to the platform where the system constant is used.

Use system constants in the platform configuration

You can change the value of a system constant in the Platform Configuration. The existing system constants are listed in the System Constant tab.

By default, the value from the Declaration Editor is inherited. To change the value, double-click in the Definition column and enter the new value.

Example

In this example, there are three system constants that are defined in the platform configuration.

  • sys_const_ONE is defined with the value of 2
  • sys_const_TWO is defined to receive the default value of channel_a, that is: it does not take over the value of channel_a as specified in the step list
  • sys_const_THREE keeps its default value as given in the Declaration Editor

System constants defined in the Platform Configuration

Constants and system constants in the Signal Viewer and in the report

Select Record to display the constant or system constant also in the Signal Viewer. More about the Signal Viewer, see Signal Viewer. After the test execution the system constant will also be shown in the report in a specific table called "System Constants" in the "Signals" section.

If you load TPT files older than TPT 12, the Record check box will be automatically selected for constants and system constants.

When you use a Logging mapping flavor in the platform configuration, this logging will override the setting done with the Record check box. More about the logging mapping flavor, see Mapping Flavor - Logging.

System constant in platform

System constants will be exported to the assessment as assessment variables. If assessment variables with the same name already exist, this will lead to name conflicts.